home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 March / CMCD0305.ISO / Software / Shareware / Utilitare / emu / Emu8086_Setup_307c.exe / {app} / Samples / simple_io.asm < prev    next >
Assembly Source File  |  2003-06-05  |  845b  |  49 lines

  1. ; This sample shows how to access
  2. ; virtual ports (00000Fh to 0FFFFh).
  3. ; These ports are emulated in
  4. ; "EmuPort.io" file (saved in
  5. ; Windows "Temp" folder).
  6. ;
  7. ; This new technology allows 
  8. ; to make external add-on devices
  9. ; for Emu8086, such as led displays,
  10. ; thermostat, stepper-motor, etc...
  11.  
  12. ; "DEVICES" folder contains sample
  13. ; device that works with this sample.
  14. ; (with Visual Basic source code).
  15.  
  16. ; Start "Simple.exe" before running
  17. ; this sample (from "Virtual
  18. ; Devices" menu of the emulator).
  19.  
  20. #make_COM#
  21.  
  22. ORG 100h
  23.  
  24.  
  25. ; Write byte value "215"
  26. ; into the port 115:
  27. mov al, 215
  28. out 115, al
  29.  
  30. ; Write word value "1234"
  31. ; into the port 117:
  32. mov ax, 1234
  33. out 117, ax
  34.  
  35. ; Reset:
  36. mov ax, 0
  37.  
  38. ; Read byte from
  39. ; port 110 into AL:
  40. in al, 110
  41.  
  42. ; Read word from
  43. ; port 112 into AX:
  44. in ax, 112
  45.  
  46.  
  47. ret
  48.  
  49.